<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>角色管理 </title>
	{{>/WEB-INF/pages/common/meta_base.part.html}}
	{{>/WEB-INF/pages/common/refs_base.part.html}}
	{{>/WEB-INF/pages/common/refs_modal.part.html}}
<script type="text/javascript"
	src="{{ctx}}/static/bsl/js/rbac/rbac-privilege.js"></script>
<script type="text/javascript"
	src="{{ctx}}/static/bsl/js/jquery.json-2.4.js"></script>
<script src="{{ctx}}/static/jquery-blockui/jquery.blockUI.js" type="text/javascript"></script>
<script src="{{ctx}}/static/jquery-dataTable/jquery.dataTables.js" type="text/javascript"></script>
<style type="text/css">
  .a_nav{
    text-decoration: none;
	color: black;
  }
</style>
</head>

<body>
	<!---头部---->
	{{>/WEB-INF/pages/common/layout_header.part.html}}
	<!---头部结束---->
	

	<!---内容开始---->


	<div class="container">
		<ul class="breadcrumb">
		  <li><a href="{{ctx}}">首页</a></li>
		  <li><a href="{{ctx}}/rbac/user/user-view">安全中心</a></li>
		  <li class="active">角色管理</li>
		</ul>
        <hr class="hr1">
    	<!---内容开始---->
     	<div class="hr-10"></div>
 		<div class="hr-10"></div>
 		<div class="hr-10"></div>
  
   		<div class="bg-ga container">
   			<!-- 导航栏 -->
	  		<div class="col-sm-2 left_tab">
	     		<ul style="margin: 0">
					<li class="leff_tab_choose">安全中心</li>
					<li><a class="a_nav" href="{{ctx}}/rbac/user/user-view">用户管理</a></li>
					<li class="menu-choose"><a class="a_nav" href="{{ctx}}/rbac/privilege/privilege-view">角色管理</a></li>
					<li><a class="a_nav" href="{{ctx}}/rbac/operation/operation-view">操作管理</a></li>
					<li><a class="a_nav" href="{{ctx}}/mam-rbac/admins/list">管理员管理</a></li>
				</ul>
	    	</div>


			<!-- 右边栏 -->
			<div class="col-sm-10 bg-st-white">
				<div class="bg_green2-w">
					<div class="intro">角色管理</div>
				</div>
				<div class="hr-10"></div>
				<div style="margin:5px 20px 10px">
					{{>/WEB-INF/pages/common/simplequery.part.html}}
			    </div>
				<div>
 					<p class="navbar-form btn-w">
	  					<input type="hidden" class="form-control wid200px">
	  					<button type="submit" class="btn btn-primary tls btn-sm"  data-toggle="modal"
									href="#addRoleModal">新增</button>
	  					<button type="submit" class="btn tls btn-common btn-sm" onclick="deleteRoles()">删除</button>
					</p>
				</div>
				<div class="hr-10"></div>
				<div class="mar-st-r10">
					<table id="roleListTable" border="0" cellpadding="0" cellspacing="0"
						class="table table-bordered table-center">
						<thead>
							<tr class="title title10" style="background-color: rgb(248, 248, 248);">
								<th class="bd_txt2 bd_le" width="3%">
									<input id="selectAllRoleCheckbox" class="choice-w" roletype="{{roleType}}" type="checkbox" onchange="selectAll('selectAllRoleCheckbox','roleListBody')">
								</th>
								<th class="bd_txt2 bd_le" width="10%">角色ID</th>
								<th class="bd_txt2 bd_le">角色名</th>
								<th class="bd_txt2 bd_le">操作</th>
							</tr>
						</thead>
						<tbody id="roleListBody">
							{{#roleList}}
							<tr style="background-color: rgb(255, 255, 255);">
								<td roleType="{{roleType}}" class="bd_txt3">
									<input class="choice-w" type="checkbox" id="{{id}}" value="{{id}}">
								</td>
								<td class="bd_txt3">{{rolename}}</td>
								<td class="bd_txt3">{{name}}</td>
								<td class="bd_txt3">
									<!-- <a href="#userInfo"> -->
	                                    <button type="button" class="btn tls btn-primary btn-sm edit-btn" data-toggle="modal" href="#editRoleModal" onclick="showEditWindow('{{rolename}}','{{name}}','{{roleType}}','{{id}}')">编辑</button>
										<button type="botton" class="btn btn-primary tls btn-sm"
										onclick="showRoleUserList('{{id}}')">用户设置</button>
									<!-- </a> -->
										
									<button type="botton" class="btn tls btn-primary btn-sm privilege-btn" data-roleid="{{id}}">授权</button> 
									<input type="hidden" class="roleTypeInput" value="{{roleType}}">
								</td>
							</tr>
							{{/roleList}}
						</tbody>
					</table>	
					{{#page}} {{>/WEB-INF/pages/common/pagination.part.html}} {{/page}}
				</div>
				<!-- 用户设置界面 -->
				<div id="div-role-user" style="display:none">
					<div class="bg_green2-w">
						<div class="intro" id="userInfo">用户设置</div>
					</div>

					<div class="">
						<p class="navbar-form btn-w">
						  	<input type="hidden" class="form-control wid200px">
						  	<button id = "btn-addUser" type="submit" class="btn btn-primary tls btn-sm" data-toggle="modal"  >新增</button>
						  	<button id = "btn-deleteUser" type="submit" class="btn tls btn-common btn-sm" >删除</button>
						</p>
					</div>

					<div class="hr-10"></div>
					<div class="mar-st-r10">
						<table id="roleUserTable" border="0" border="0" cellpadding="0" cellspacing="0"
						class="table table-bordered table-center">
							<thead>
								<tr>
									<td class="bd_txt2" width="3%">
										<input id="selectAllRoleUserCheckbox" class="choice-w" type="checkbox" onchange="selectAll('selectAllRoleUserCheckbox','tbody-userList')">
									</td>
									<td class="bd_txt2 bd_le">用户名</td>
										<td class="bd_txt2 bd_le">用户昵称</td>
									<!-- <td class="bd_txt2 bd_le">用户类型</td> -->
									<td class="bd_txt2 bd_le">账号状态</td>
								</tr>
							</thead>
							<tbody id="tbody-userList">
							</tbody>
						</table>
					</div>
				</div>

		   	</div>	
 
    	</div>

  	</div>
  	
	{{>/WEB-INF/pages/common/layout_footer.part.html}}
	{{>/WEB-INF/pages/rbac/rbac-privilege-modal.html}}
</body>

</html>

